package com.follow.dao;

import com.follow.pojo.TbDepartment;
import com.follow.pojo.TbUserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * Created by Administrator on 2020/9/24.
 */
@Mapper
public interface TbUserVOMapper {

    List<TbUserVO> selectUserAll(@Param("startNum") Integer startNum,
                                 @Param("pageSize") Integer pageSize,
                                 @Param("id") Integer id,
                                 @Param("userId") String userId,
                                 @Param("userName") String userName,
                                 @Param("password") String password,
                                 @Param("roleId") Integer roleId ,
                                 @Param("sex") Integer sex,
                                 @Param("phone") String phone,
                                 @Param("mail") String mail,
                                 @Param("departmentId") Integer departmentId

    );

    Integer selectUserCount(
                            @Param("id") Integer id,
                            @Param("userId") String userId,
                            @Param("userName") String userName,
                            @Param("password") String password,
                            @Param("roleId") Integer roleId,
                            @Param("sex") Integer sex,
                            @Param("phone") String phone,
                            @Param("mail") String mail,
                            @Param("departmentId") Integer departmentId
                            );

    //批量查询科室
    List<TbDepartment> selectDepartment();

    int addDoctor(
                  @Param("userId") String userId,
                  @Param("userName") String userName,
                  @Param("sex") Integer sex,
                  @Param("age") Integer age,
                  @Param("birthday") Date birthday,
                  @Param("phone") String phone,
                  @Param("mail") String mail,
                  @Param("password") String password,
                  @Param("roleId") Integer roleId,
                  @Param("departmentId") Integer departmentId
                  );
    //主键查询
    TbUserVO selectOne(Integer id);

    //修改
    int updateOne(TbUserVO tbUserVO);

    //批量删除
    int removeBeach(String[] ids);
}
